/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef OLA_COAP_CONF_H
#define OLA_COAP_CONF_H

#ifdef __cplusplus
extern "C" {
#endif

/* coap 同时支持的最大上下文数量 */
#define OLA_COAP_CONTEXT_MAX_NUM                1
#define OLA_COAP_CONTEXT_REQ_ITEM_MAX_NUM       10
#define OLA_COAP_CONTEXT_RESEND_ITEM_MAX_NUM    10
#define OLA_COAP_CONTEXT_RECV_ITEM_MAX_NUM      10

/* coap 锁超时时间 */
#define OLA_COAP_MUTEX_TIMEOUT                  (30 * 1000)
/* 会话超时时间 */
#define OLA_COAP_SESSION_TIMEOUT                (30 * 1000)
/* 请求超时时间 */
#define OLA_COAP_REQUEST_TIMEOUT                (30 * 1000)
/* 收到的请求超时时间 */
#define OLA_COAP_RECV_TIMEOUT                   (30 * 1000)
/* coap服务端支持的最大会话数量 */
#define OLA_COAP_SERVER_SESSION_MAX_NUM         10
#define OLA_CONTEXT_DUMP_TIMEVAL                (10 * 1000)

#define OLA_COAP_BUFFER_MIN_SIZE                (1024 * 2)
#define OLA_COAP_BUFFER_MAX_SIZE                (1024 * 64)

#define OLA_COAP_UDP_RESEND_FIRST_TIMES         30
#define OLA_COAP_UDP_RESEND_MID_TIMES           5
#define OLA_COAP_UDP_RESEND_LAST_TIMES          5
#define OLA_COAP_UDP_RESEND_FIRST_TIMEVEL       100
#define OLA_COAP_UDP_RESEND_MID_TIMEVEL         (1 * 1000)
#define OLA_COAP_UDP_RESEND_LAST_TIMEVEL        100
#ifdef __cplusplus
}
#endif

#endif /* OLA_COAP_CONF_H */